import './index.css'
import './static/style.css'
import popup from './components/popup/popup'
import video from './components/video/video'



const listItem = document.querySelectorAll('#list li')

for (let i = 0; i < listItem.length; i++) {
  listItem[i].addEventListener('click', function () {
    let { url, title } = this.dataset
    console.log(title, url)
    popup({
      width: '880px',
      height: '556px',
      pos: 'left',
      title,
      content (el) {
        console.log(el)
        video({
          url,
          el: el as HTMLElement,
          autoplay: true
        })
      }
    });
  })
}
